home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / RLaB / help / scalar < prev    next >
Text File  |  1994-04-25  |  569b  |  32 lines

  1. scalar:
  2.  
  3. Syntax:    scalar ( A )
  4.  
  5. Description:
  6.  
  7.     The scalar function attempts to cast (convert) it's argument
  8.     to a scalar.
  9.  
  10.     scalar( 2 )
  11.  
  12.     will produce a scalar with value 2.
  13.  
  14.     scalar()
  15.  
  16.     will produce a scalar with value of zero.
  17.  
  18.     scalar(v[1])
  19.  
  20.     will convert the 1st element of v to a scalar.
  21.  
  22.     scalar(m[2;3])
  23.  
  24.     will convert an element of a matrix to a scalar.
  25.  
  26.     Scalar is provided mostly for symmetry with the matrix()
  27.     functions. Functionally it is not really necessary since scalar
  28.     references to matrices are automatically demoted to scalar
  29.     type.
  30.  
  31. See Also: matrix
  32.